package com.campus.help.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.help.entity.Merchant;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商户Mapper接口
 */
@Mapper
public interface MerchantMapper extends BaseMapper<Merchant> {
    
    /**
     * 根据用户名查询商户
     */
    Merchant selectByUsername(@Param("username") String username);
    
    /**
     * 更新最后登录时间和登录次数
     */
    int updateLoginInfo(@Param("id") Long id, @Param("lastLoginTime") java.time.LocalDateTime lastLoginTime);
}